﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="SearchVolunteer.ascx.vb"
    Inherits="WebForm_ManageVolunteer_SearchVolunteer" %>
<%@ Register Src="SearchRegionVolunteerControl.ascx" TagName="SearchRegionVolunteerControl"
    TagPrefix="uc1" %>
<%@ Register Src="~/WebForm/CommonControl/ChangeRecordControl.ascx" TagName="ChangeRecordControl"
    TagPrefix="My" %>
<%@ Register Src="GroupControl.ascx" TagName="GroupControl"
    TagPrefix="My" %> 
<table>
    <tr>
        <td>
            <table align="left">
                <tr>
                    <td align="right">
                        <asp:Label ID="lblVOrganizationID" runat="server" meta:resourcekey="lblVOrganizationID"></asp:Label>
                    </td>
                    <td align="left">
                        <asp:DropDownList ID="ddlVOrganizationID" runat="server" AutoPostBack="true">
                        </asp:DropDownList>
                    </td>
                    <td align="right">
                        <asp:Label ID="lblVolunteerType" runat="server" meta:resourcekey="lblVolunteerType"></asp:Label>
                    </td>
                    <td align="left">
                        <asp:DropDownList ID="ddlVolunteerType" runat="server" AutoPostBack="false">
                        </asp:DropDownList>
                    </td>
                </tr>
                                
                <tr>
                    <td align="right">
                        <asp:Label ID="lblVolunteerId" runat="server" Text="<%$ Resources:VolunteerId %>"></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtVolunteerId" runat="server" MaxLength="20" Width="150px"></asp:TextBox>
                    </td>
                    <td>
                        <asp:Label ID="lblVolunteerName" runat="server" Text="<%$ Resources:VolunteerName %>"></asp:Label>
                    </td>
                    <td>
                        <asp:TextBox ID="txtVolunteerName" runat="server" MaxLength="20" Width="150px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td align="right">
                        <asp:Label ID="lblTEL" runat="server" Text="<%$ Resources:TEL %>"></asp:Label>
                    </td>
                    <td align="left">
                        <asp:TextBox ID="txtTEL" runat="server" MaxLength="20" Width="150px"></asp:TextBox>
                    </td>
                    <td colspan="3">
                       <asp:Button ID="btnQuery" runat="server" Text="<%$ Resources:Query %>" />
                       <asp:Button ID="btnShowPerson" runat="server" Text="<%$ Resources:ShowPerson %>"
                            ValidationGroup="ShowPersonA" />
                        <asp:Button ID="btnExportVolunteer" runat="server" meta:resourcekey="btnExportVolunteer" />    
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td align="center">
            <table>
                <tr>
                    <td align="right">
                        <asp:Label ID="lblGroupName" runat="server"  Text="<%$ Resources:GroupName %>"></asp:Label>
                    </td>
                    <td align="left">
                        <asp:DropDownList ID="ddlGroupName" runat="server"></asp:DropDownList>
                    </td>
                    <td align="right">
                        <asp:Button ID="btnPersonToGroup" runat="server"  Text="<%$ Resources:PersonToGroup %>" />
                    </td>
                    <td align="left">
                        <asp:Button ID="btnSetGroup" runat="server"  Text="<%$ Resources:SetGroup %>" />
                        <asp:Button ID="btnClearGroup" runat="server" Text="<%$ Resources:ClearGroup %>" />
                    </td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td>
        <div id="Table1" align=center style="OVERFLOW: auto; HEIGHT: 300px">
            <table>
                <tr>
                    <td>
                        <My:MyGridView ID="gv" runat="server" SkinID="pager" meta:resourcekey="gv" AllowPaging="false" 
                            AllowHoverSelect="False" DataKeyNames="VolunteerID,VOrganizationID,UOrganizationID"
                            AllowHoverEffect="True" MySortDirection="Ascending" AutoGenerateColumns="False"
                            MySortExpression="A.VolunteerID" AllowSorting="true">
                            <Columns>
                             <asp:TemplateField>
                                <itemtemplate>
                                    <asp:CheckBox ID="chkGroup" runat=server></asp:CheckBox>
                                </itemtemplate>
                              </asp:TemplateField>
                               <My:VolunteerIDBoundField DataField="VolunteerID" meta:resourcekey="bfVolunteerID"
                                ReadOnly="True" SortExpression="A.VolunteerID" />
                               <asp:BoundField DataField="VolunteerDistinctName" meta:resourcekey="bfVolunteerName" SortExpression="A.VolunteerDistinctName" />
                                <asp:BoundField DataField="VOrganizationName" meta:resourcekey="bfVOrganizationName" />
                              <asp:BoundField DataField="GroupName" meta:resourcekey="bfGroupName" SortExpression="g.GroupName" />
                              <asp:BoundField DataField="InsuranceEndDate" meta:resourcekey="bfInsuranceEndDate" />
                                <asp:TemplateField meta:resourcekey="bfIsLeader" SortExpression="C.Source">
                                    <itemtemplate>
                                        <asp:DropDownList ID="ddlVolunteerType" runat="server"></asp:DropDownList>
                                        <asp:LinkButton ID="lknSave" CommandName="Update" runat="server" meta:resourcekey="lknSave"></asp:LinkButton>
                                    </itemtemplate>
                                </asp:TemplateField>
                                <asp:TemplateField>
                                    <itemtemplate>
                                        <asp:LinkButton ID="lknEdit" CommandName="Edit" runat="server" meta:resourcekey="lknEdit"></asp:LinkButton>
                                     </itemtemplate>
                                </asp:TemplateField>
                                <asp:TemplateField ShowHeader="False">
                                    <itemtemplate>
                                        <asp:LinkButton ID="lbtnDel" runat="server" CausesValidation="False" 
                                          CommandName="DeleteVolunteer" Text="<%$ Resources:Delete %>"></asp:LinkButton>
                                      </itemtemplate>
                                </asp:TemplateField>
                                <asp:TemplateField meta:resourcekey="bfPhoto">
                                    <itemtemplate>                
                                        <asp:Image ID="imgPhoto" runat="server" ImageUrl='<%# Me.PhotoPathBase + Eval("PhotoPath") + "?" + (New Random()).Next().ToString() %>' AlternateText='<%# Eval("PhotoPath") %>' Width="80" Height="100" />
                                     </itemtemplate>
                                </asp:TemplateField>
                            </Columns>
                        </My:MyGridView>
                    </td>
                </tr>
            </table>
        </div>
        </td>
    </tr>
</table>
<uc1:SearchRegionVolunteerControl ID="SearchRegionVolunteerControl1" runat="server" />
<My:ChangeRecordControl ID="ChangeRecordControl1" runat="server" />
<My:GroupControl ID="GroupControl1" runat="server" />